#include "ros/ros.h"
#include "std_msgs/String.h"

int main(int argc, char **argv)
{
    ros::init(argc, argv, "test");
    ros::NodeHandle nh;

    ros::Publisher chatter_pub = nh.advertise<std_msgs::String>("chatter", 1000);

    ros::Rate loop_rate(10);
//    while (ros::ok())
//    {
        std_msgs::String msg;
        msg.data = "hello world";

        chatter_pub.publish(msg);

        ros::spinOnce();

        loop_rate.sleep();
//    }

    return 0;
}
